package org.xiao;

import java.io.*;

public class InputStreamReader1 {
    public static void main(String[] args) throws IOException {
        FileInputStream is = new FileInputStream("D:\\study\\IO\\IOstudy\\src\\main\\resources\\test.txt");
        FileOutputStream os = new FileOutputStream("D:\\study\\IO\\IOstudy\\src\\main\\resources\\test2.txt");
        Reader isr = new InputStreamReader(is);
        Writer osr = new OutputStreamWriter(os);
        BufferedReader br = new BufferedReader(isr);
        BufferedWriter bw = new BufferedWriter(osr);
//        BufferedWriter bw = new BufferedWriter(new FileWriter("D:\\study\\IO\\IOstudy\\src\\main\\resources\\test2.txt"));
        String s;
        while ((s = br.readLine()) != null) {
//            bw.write(s);
//            bw.newLine();
            System.out.println(s);
        }

        isr.close();
        osr.close();
        br.close();
        bw.close();
    }
}
